package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbPlanRegion entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_PLAN_REGION", schema = "dbo", catalog = "AGDB")
public class TbPlanRegion implements java.io.Serializable {

	// Fields

	private String prId;
	private String prName;
	private String prDetail;
	private String a;
	private String b;
	private String c;
	private Set<TbPlan> tbPlans = new HashSet<TbPlan>(0);

	// Constructors

	/** default constructor */
	public TbPlanRegion() {
	}

	/** minimal constructor */
	public TbPlanRegion(String prId, String prName) {
		this.prId = prId;
		this.prName = prName;
	}

	/** full constructor */
	public TbPlanRegion(String prId, String prName, String prDetail, String a,
			String b, String c, Set<TbPlan> tbPlans) {
		this.prId = prId;
		this.prName = prName;
		this.prDetail = prDetail;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbPlans = tbPlans;
	}

	// Property accessors
	@Id
	@Column(name = "PR_ID", unique = true, nullable = false, length = 10)
	public String getPrId() {
		return this.prId;
	}

	public void setPrId(String prId) {
		this.prId = prId;
	}

	@Column(name = "PR_NAME", nullable = false, length = 20)
	public String getPrName() {
		return this.prName;
	}

	public void setPrName(String prName) {
		this.prName = prName;
	}

	@Column(name = "PR_DETAIL", length = 50)
	public String getPrDetail() {
		return this.prDetail;
	}

	public void setPrDetail(String prDetail) {
		this.prDetail = prDetail;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbPlanRegion")
	public Set<TbPlan> getTbPlans() {
		return this.tbPlans;
	}

	public void setTbPlans(Set<TbPlan> tbPlans) {
		this.tbPlans = tbPlans;
	}

}